<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer">
{{ if .Site.Params.description }}
<meta name="description" content="{{ .Site.Params.description }}">
{{ end }}

<base href="{{ .Site.BaseURL }}">

<link rel="canonical" href="{{ .Permalink }}">
<!-- HTTPS -->

<script type="text/javascript">
    var baseURL = '{{ .Site.BaseURL }}';
    var host = baseURL.substring(0, baseURL.length - 1).replace(/\//g, '');
    if ((host === window.location.host) && (window.location.protocol !== 'https:')) {
        window.location.protocol = 'https:';
    }
</script>

<!-- CSS -->

{{ if .Site.Params.highlightjs }}
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/styles/default.min.css">
{{ end }}

<!-- Fonts and icon CSS -->

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Ubuntu+Mono:400,400i,700,700i|Raleway:500">

<link href="/css/main.css" rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<!--{{ if .Site.Params.cachebuster }}

    {{ $t := .Now.Unix }}
    <link rel="stylesheet" href="/css/reset.css?t={{$t}}">
    <link rel="stylesheet" href="/css/pygments.css?t={{$t}}">
    <link rel="stylesheet" href="/css/main.css?t={{$t}}">
    {{range .Site.Params.extracssfiles}}
        <link rel="stylesheet" href="{{.}}?t={{$t}}">
    {{ end }}

{{ else }}

    <link rel="stylesheet" href="/css/reset.css">
    <link rel="stylesheet" href="/css/pygments.css">
    <link rel="stylesheet" href="/css/main.css">
    {{range .Site.Params.extracssfiles}}
        <link rel="stylesheet" href="{{.}}">
    {{end}}

{{ end }}-->

<!-- Icon -->
<link rel="shortcut icon"
{{ if .Site.Params.faviconfile }}
    href="/{{ .Site.Params.faviconfile }}"
{{ else }}
    href="/img/favicon.ico"
{{ end }}
>

<!-- RSS -->
{{ if .RSSLink }}
  <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}

<!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if eq $url "/" }}
    {{ .Site.Title }}
{{ else }}
    {{ if .Params.heading }} {{ .Params.heading }} {{ else }} {{ .Title }} {{ end }}
{{ end }}
</title>

</head>
